﻿
Public Class frmLogo
    Public mArryS As New List(Of String)
    Public mDatetime As New List(Of DateTime)
    Public mNetTime As DateTime
    Private Sub ButOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButOk.Click
        Dim bm As Boolean = False
        For i As Integer = 0 To mArryS.Count - 1
            Dim a As String = Me.TextCode.Text.Trim
            If a = mArryS.Item(i) Then
                If mNetTime >= mDatetime.Item(i) Then
                    MsgBox("您的软件使用时间已到期,请与作者联系!", MsgBoxStyle.OkOnly, "提示")
                    Exit Sub
                Else
                    MsgBox("验证成功,您可以免费使用程序至 " & Mid(mDatetime.Item(i).ToShortDateString.ToString.Trim, 1, 10), MsgBoxStyle.OkOnly, "提示")
                    bm = True
                    FileOpen(1, My.Application.Info.DirectoryPath & "\asUser.txt", OpenMode.Output)
                    PrintLine(1, a)
                    FileClose()
                    Me.DialogResult = Windows.Forms.DialogResult.OK
                End If
            End If
        Next
        If bm = False Then
            MsgBox("验证失败,请重试!", MsgBoxStyle.OkOnly, "提示")
            Me.Close()
        End If
    End Sub

    Private Sub ButCancal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButCancal.Click
        Me.DialogResult = Windows.Forms.DialogResult.Cancel
        Me.Close()

    End Sub

    Private Sub frmLogo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class


